#include<string.h>
#include<stdio.h>
struct people
{
    char name[20];
    int count;
};
int main()
{
     struct people a[3]={{"zhao",0},{"li",0},{"sun",0}};
     int i,j;
     char b[40];
     for(i=0;i<=10;i++)
     {scanf("%s",b);
      for(j=0;j<3;j++)
      if(strcmp(b,a[j].name)==0)
         a[j].count++;
     }
      for(i=0;i<3;i++)
      {printf("%s,%d\n",a[i].name,a[i].count);} 
       return 0;
}
